﻿namespace System.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class CreatTableTojiankong : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.T_Cost_Delivery",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        ExpenseId = c.Int(nullable: false),
                        PaidInAmount = c.Double(nullable: false),
                        PaymentChannel = c.String(maxLength: 100, unicode: false),
                        Payment = c.String(maxLength: 100, unicode: false),
                        CreateTime = c.DateTime(nullable: false),
                        IsRemoved = c.Boolean(nullable: false),
                        Remark = c.String(maxLength: 255, unicode: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.T_Expense_Information",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        ExpenseName = c.String(maxLength: 100, unicode: false),
                        ExpenseType = c.String(maxLength: 100, unicode: false),
                        ExpenseNumber = c.Double(nullable: false),
                        ExpenseState = c.Boolean(nullable: false),
                        ExpenseBelong = c.String(maxLength: 100, unicode: false),
                        CreateTime = c.DateTime(nullable: false),
                        IsRemoved = c.Boolean(nullable: false),
                        Remark = c.String(maxLength: 255, unicode: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.T_Surveillance_Video",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        VideoName = c.String(maxLength: 100, unicode: false),
                        DepositId = c.Int(nullable: false),
                        VideoSize = c.String(maxLength: 100, unicode: false),
                        CreateTime = c.DateTime(nullable: false),
                        IsRemoved = c.Boolean(nullable: false),
                        Remark = c.String(maxLength: 255, unicode: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.T_Video_Deposit",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        DepositName = c.String(maxLength: 100, unicode: false),
                        DepositSeat = c.String(maxLength: 100, unicode: false),
                        CreateTime = c.DateTime(nullable: false),
                        IsRemoved = c.Boolean(nullable: false),
                        Remark = c.String(maxLength: 255, unicode: false),
                    })
                .PrimaryKey(t => t.Id);
            
            //AddColumn("dbo.T_Material", "MaintenanceCycle", c => c.String(maxLength: 100, unicode: false));
        }
        
        public override void Down()
        {
            //DropColumn("dbo.T_Material", "MaintenanceCycle");
            DropTable("dbo.T_Video_Deposit");
            DropTable("dbo.T_Surveillance_Video");
            DropTable("dbo.T_Expense_Information");
            DropTable("dbo.T_Cost_Delivery");
        }
    }
}
